package org.ldh.service.impl;

import org.ldh.dao.BookTypeDao;
import org.ldh.dao.impl.BookTypeDaoImpl;
import org.ldh.domain.BookType;
import org.ldh.service.BookTypeService;

import java.util.List;

/**
 * 图书类别的业务层实现类
 */
public class BookTypeServiceImpl implements BookTypeService {
    //调用dao层
    private BookTypeDao bookTypeDao = new BookTypeDaoImpl();

    @Override
    public List<BookType> findAll() {
        return bookTypeDao.findAll();
    }

    @Override
    public BookType findById(String bookTypeId) {
        return bookTypeDao.findById(bookTypeId);
    }

    @Override
    public void save(BookType bookType) {
        bookTypeDao.save(bookType);
    }

    @Override
    public void update(BookType bookType) {
        bookTypeDao.update(bookType);
    }

    @Override
    public void delete(String bookTypeId) {
        bookTypeDao.delete(bookTypeId);
    }
}
